#define _CRT_SECURE_NO_WARNINGS 1
int main()
{

	//开辟且初始化
	int* p1 = (int*)malloc(sizeof(int));
	*p1 = 1;

	int* p2 = new int(1);

	int* p3 = (int*)malloc(sizeof(int) * 5);
	for (int i = 0; i < 5; ++i)
	{
		p3[i] = i + 1; // 将每个元素初始化为0
	}


	int* p4 = new int[5]{ 1,2,3,4,5 };

	//释放
	free(p1);
	delete p2;
	free(p3);
	delete[]p4;

	return 0;
}